const mongoose = require('mongoose');
module.exports = () => {
    let schema = new mongoose.Schema({
        userId: {
            type: mongoose.Schema.Types.ObjectId,
            ref: 'User'//用户id
        },
        addTime:Date,//下单日期
        payTime:Date,//支付日期
        payStatus:{
            default: 0,
            type: Number,//0未支付1支付
        },
        orderNo:String,//订单编号
        orderName:String,//订单编号
        payType:{
            default: 1,
            type: Number,//1微信支付2支付宝支付
        },
        verifyType:{
            default: 1,
            type: Number,//1首次审核2二次审核
        },
        price:Number,
        deletedAt: Date,
        createdAt: Date,
        updatedAt: Date,
    }, {collection: 'tbl_order'});
    return schema;
};